﻿#include <CommonUnits/StandardUnit.h>
#include <gtest/gtest.h>

TEST(StandardUnitTest, StandardUnit)
{
    using V  = CU::StandardUnit<"V">;
    using mV = CU::DeriveUnit<V, "mV", std::milli>;
    using m  = CU::StandardUnit<"m">;
    using km = CU::DeriveUnit<m, "km", std::kilo>;
    EXPECT_TRUE(static_cast<bool>(CU::isSeriesUnit<V, mV>));
    EXPECT_TRUE(static_cast<bool>(CU::isSeriesUnit<V, V>));
    EXPECT_FALSE(static_cast<bool>(CU::isSeriesUnit<m, mV>));
}

int main(int argc, char* argv[])
{
    testing::InitGoogleTest(&argc, argv);
    return RUN_ALL_TESTS();
}
